<?php

namespace App\Service;


use App\Repositories\OrdersRepository;
use App\Repositories\UserCardRepository;
use App\Repositories\UserCourseRepository;
use App\Repositories\UsersRepository;
use EasyWeChat\Factory;
use EasyWeChat\OfficialAccount\Application;
use Illuminate\Http\Request;
use Illuminate\Support\Arr;

class WeChatService extends BaseService {

    public static $app;
    public static $payment;
    protected $ordersRepository;
    protected $usersRepository;
    protected $userCourseRepository;
    protected $userCardRepository;

    public function __construct(
        OrdersRepository $ordersRepository,
        UsersRepository $usersRepository,
        UserCardRepository $userCardRepository,
        UserCourseRepository $userCourseRepository
    ){
        self::$app = Factory::officialAccount(config('wechat.official_account.default'));
        self::$payment = Factory::payment(config('wechat.payment.payment'));
        $this->ordersRepository = $ordersRepository;
        $this->usersRepository = $usersRepository;
        $this->userCourseRepository = $userCourseRepository;
        $this->userCardRepository = $userCardRepository;
    }

}
